(() => {
    //我们设计红绿灯系统 0代表绿灯 1代表红灯 2代表黄灯
    let Color;
    (function (Color) {
        Color[Color["green"] = 0] = "green";
        Color[Color["red"] = 1] = "red";
        Color[Color["yellow"] = 2] = "yellow";
    })(Color || (Color = {}));
    console.log(Color.green); //0
    console.log(Color.red); //1
    console.log(Color.yellow); //2
    console.log(Color[0]);
    console.log(Color[1]);
    console.log(Color[2]);
    //如果给某个枚举的值设置值 则接下来的值就会一次顺延
    let boxLocal;
    (function (boxLocal) {
        boxLocal[boxLocal["left"] = 2] = "left";
        boxLocal[boxLocal["right"] = 3] = "right";
        boxLocal[boxLocal["top"] = 4] = "top";
        boxLocal[boxLocal["bottom"] = 5] = "bottom";
    })(boxLocal || (boxLocal = {}));
    console.log(boxLocal.left); //2
    console.log(boxLocal.right); //3
    console.log(boxLocal.top); //4
    console.log(boxLocal.bottom); //5
})();
